<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var str = "uuuuaaaaaaccccccccddddd";
      //把它分割成数组
      var strA = str.split("");

    //然后用revers()  来反转排序，然后再把数组转回字符串  （用join("")）
      var strB = strA.reverse().join("");
      console.log(strB)
    </script>
  </body>
</html>
